#include <iostream>
#include <algorithm>

using namespace std;

int main(){
	
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);

	int n,l;
	cin >> n >> l;
	
	int a[n];
	
	int maxi = 0;
	
	for(int i = 0; i < n; ++i){
		cin >> a[i];
		maxi = max(maxi,a[i]);
	}
	
	int ans = 0;
	
	while(l <= maxi){
		int count = 0,area = 0;
		for(int i = 0; i < n; ++i){
			int num = a[i];
			count += num / l;
		}
		area = count * l;
		ans = max(ans,area);
		l++;
	}

	cout << ans;

	return 0;
}
